home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-03
/
qbfaqr01.zip
/
PRINTC.BAS
< prev
next >
Wrap
BASIC Source File
|
1992-08-10
|
452b
|
23 lines
DEFINT A-Z
FUNCTION CLR$(C)
IF C < 0 OR C > 31 THEN CLR$ = "@": EXIT FUNCTION
CLR$ = CHR$(C+128)
END FUNCTION
SUB Printc (s$, ErrC)
ErrC = 0
FOR I = 1 to LEN(s$) - 1
A = ASC(MID$(s$, I, 1))
B = ASC(MID$(s$, I + 1, 1))
IF A > 160 OR B > 160 THEN ErrC = 1: EXIT SUB
IF A > 127 THEN
IF B > 127 THEN
COLOR A - 128, B - 128
END IF
ELSE
PRINT CHR$(A);
END IF
NEXT
END SUB